program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 n0, n, i: integer;
 x, y, p: real;
begin
  randomize;
  n0:=0;
  n:=0;
  for i:=0 to 100000 do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)<=1) then
      n0:=n0+1;
    n:=n+1;
  end;
  p:=4*n0/n;
  writeln(p:0:9);
  readln;
end.
